import 'package:flutter/material.dart';

class registerSecondPage extends StatefulWidget {
  const registerSecondPage({super.key});

  @override
  State<registerSecondPage> createState() => _registerSecondPageState();
}

class _registerSecondPageState extends State<registerSecondPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: Text('注册第二步')),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            Text('注册第二步'),
             ElevatedButton(
              onPressed: () {
                //命名路由
                // Navigator.pushNamed(context, '/registrThree');

                //替换路由(替换当前的页面)
                Navigator.of(context).pushReplacementNamed('/registrThree');
              },
              child: Text('跳转到第三步'),
            ),
          ],
        ),
      ),
    );
  }
}
